package com.vcms.cms.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * ContentAttachment entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "content_attachment", catalog = "vcms_0.1")
public class ContentAttachment implements java.io.Serializable {

	// Fields

	private Integer contentAttachmentId;
	private Content content;
	private Integer priority;
	private String attachmentPath;
	private String attachmentName;
	private String fileName;
	private Integer downloadCount;

	// Constructors

	/** default constructor */
	public ContentAttachment() {
	}

	/** full constructor */
	public ContentAttachment(Content content, Integer priority,
			String attachmentPath, String attachmentName, String fileName,
			Integer downloadCount) {
		this.content = content;
		this.priority = priority;
		this.attachmentPath = attachmentPath;
		this.attachmentName = attachmentName;
		this.fileName = fileName;
		this.downloadCount = downloadCount;
	}

	// Property accessors
	@Id
	@GeneratedValue
	@Column(name = "contentAttachmentId", unique = true, nullable = false)
	public Integer getContentAttachmentId() {
		return this.contentAttachmentId;
	}

	public void setContentAttachmentId(Integer contentAttachmentId) {
		this.contentAttachmentId = contentAttachmentId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "contentId")
	public Content getContent() {
		return this.content;
	}

	public void setContent(Content content) {
		this.content = content;
	}

	@Column(name = "priority")
	public Integer getPriority() {
		return this.priority;
	}

	public void setPriority(Integer priority) {
		this.priority = priority;
	}

	@Column(name = "attachmentPath", length = 300)
	public String getAttachmentPath() {
		return this.attachmentPath;
	}

	public void setAttachmentPath(String attachmentPath) {
		this.attachmentPath = attachmentPath;
	}

	@Column(name = "attachmentName", length = 200)
	public String getAttachmentName() {
		return this.attachmentName;
	}

	public void setAttachmentName(String attachmentName) {
		this.attachmentName = attachmentName;
	}

	@Column(name = "fileName", length = 200)
	public String getFileName() {
		return this.fileName;
	}

	public void setFileName(String fileName) {
		this.fileName = fileName;
	}

	@Column(name = "downloadCount")
	public Integer getDownloadCount() {
		return this.downloadCount;
	}

	public void setDownloadCount(Integer downloadCount) {
		this.downloadCount = downloadCount;
	}

}